﻿namespace 虚方法
{
    internal class Program
    {
        static void Main(string[] args)
        {

            Parent child = new Child();
            child.Say();

            Console.WriteLine("Hello, World!");
        }
    }

    internal class Parent
    {

        public virtual void Say()
        {
            Console.WriteLine("老子");
        }

    }


    internal class Child : Parent
    {
        public override void Say()
        {
            base.Say();

            Console.WriteLine("儿子");
        }
    }

}
